﻿/************************************************************************

   Extended Silverlight Toolkit

   Copyright (C) 2010-2012 Xceed Software Inc.

   This program is provided to you under the terms of the Microsoft Public
   License (Ms-PL) as published at http://extendedsilverlight.codeplex.com/license

   Please purchase a commercial version of this toolkit if you are using
   it in a commercial product. The commercial versions support the project,
   and also include more features for each control, priority support,
   source code, updates, removed watermark, and a proprietary license.

   Visit http://xceed.com and follow @datagrid on Twitter.

  **********************************************************************/

using System;
using System.Collections;

namespace Xceed.Silverlight.Data
{
  public sealed class DataQueryResult
  {
    public DataQueryResult( 
      IEnumerable data, 
      Nullable<long> inlineCount = null, 
      Nullable<long> totalCount = null )
    {
      if( data == null )
        throw new ArgumentNullException( "data" );

      m_data = data;
      m_inlineCount = inlineCount;
      m_totalCount = totalCount;
    }


    #region Data Property

    public IEnumerable Data
    {
      get
      {
        return m_data;
      }
    }

    private IEnumerable m_data; //null

    #endregion Data Property

    #region InlineCount Property

    public Nullable<long> InlineCount
    {
      get
      {
        return m_inlineCount;
      }
      set
      {
        m_inlineCount = value;
      }
    }

    private Nullable<long> m_inlineCount; //null

    #endregion InlineCount Property

    #region TotalCount Property

    public Nullable<long> TotalCount
    {
      get
      {
        return m_totalCount;
      }
      set
      {
        m_totalCount = value;
      }
    }

    private Nullable<long> m_totalCount; //null

    #endregion TotalCount Property
  }
}
